#ifndef BATTLEDIALOGITEMS_H
#define BATTLEDIALOGITEMS_H

#include "gs.h"
#include "gamedialogitem.h"

using namespace gs;

namespace gs{
class BattleDialogGhostCard : public GameDialogItem
{
    Q_OBJECT
public:
    BattleDialogGhostCard(GameDialog*);
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    void setGhostDisplay(GhostSlot*);
    Ghost* getGhostData(){return ghostData;}
    void exorThis();
protected:
    QPixmap _ghostDisplay;
    Ghost* ghostData;
    GhostSlot* slotPlaced;
    BattleDialogGhostMarker* _batMarker;

public slots:
    void OKToKill();
};

class BattleDialogGhostMarker : public GameDialogItem
{
    Q_OBJECT
public:
    BattleDialogGhostMarker(GameDialog*);
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
protected:
};

class BattleDialogButton : public GameDialogButton
{
public:
    BattleDialogButton(GameDialog*);
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    static const int WIDTH = 100;
    static const int HEIGHT = 50;
};

class BattleDialogStartButton : public BattleDialogButton
{
public:
    BattleDialogStartButton(GameDialog*);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
};


class BattleDialogCancelButton : public BattleDialogButton
{
public:
    BattleDialogCancelButton(GameDialog*);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
};

class BattleDialogTaoButton : public GameDialogButton
{
    Q_OBJECT
public:
    BattleDialogTaoButton(GameDialog*);
    QRectF boundingRect() const;
    static const int WIDTH = 100;
    static const int HEIGHT = 50;
};

class BattleDialogTaoRedButton : public BattleDialogTaoButton
{
public:
    BattleDialogTaoRedButton(GameDialog *);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
};

class BattleDialogTaoBluButton : public BattleDialogTaoButton
{
public:
    BattleDialogTaoBluButton(GameDialog *);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
};

class BattleDialogTaoGreButton : public BattleDialogTaoButton
{
public:
    BattleDialogTaoGreButton(GameDialog *);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
};

class BattleDialogTaoYelButton : public BattleDialogTaoButton
{
public:
    BattleDialogTaoYelButton(GameDialog *);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
};

class BattleDialogTaoBlaButton : public BattleDialogTaoButton
{
public:
    BattleDialogTaoBlaButton(GameDialog *);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
};

class BattleDialogGhostStatus : public GameDialogItem
{
public:
    BattleDialogGhostStatus(GameDialog*);
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    void setGhostData(GhostSlot* g);
    static const int WIDTH = 100;
    static const int HEIGHT = 100;
protected:
    Ghost* ghostData;
};

class BattleDialogTaoResult : public GameDialogItem
{
    Q_OBJECT
public:
    BattleDialogTaoResult(GameDialog*);
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    void increment(GSColor g);
    bool check(Ghost*);
    static const int WIDTH = 100;
    static const int HEIGHT = 100;
protected:
    int red, blue, black, yellow, green, white;
signals:
    void resultUpdated();
};
}

#endif // BATTLEDIALOGITEMS_H
